let isNil = function [] -> true | _::_ -> false